package biz.obake.team.touchprotector.ui;

import android.os.Bundle;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import biz.obake.team.touchprotector.R;
import biz.obake.team.touchprotector.c;
import biz.obake.team.touchprotector.features.shake.b;
import biz.obake.team.touchprotector.g.a;

public class Tab_Shake extends a {
    public void onCreatePreferences(Bundle bundle, String str) {
        setPreferencesFromResource(R.xml.ui_tab_shake, str);
        if (b.e()) {
            prefRemove("sensor_unavailable");
            return;
        }
        PreferenceScreen preferenceScreen = getPreferenceScreen();
        for (int L0 = preferenceScreen.L0() - 1; L0 >= 0; L0--) {
            Preference K0 = preferenceScreen.K0(L0);
            if (!"sensor_unavailable".equals(K0.o())) {
                preferenceScreen.O0(K0);
            }
        }
    }

    /* access modifiers changed from: protected */
    public void onUpdateDisplay() {
        Preference H0 = getPreferenceScreen().H0("shake_sensitivity");
        if (H0 != null) {
            H0.v0(c.w(R.string.pref_shake_sensitivity_summary).replace("{0}", a.l("shake_sensitivity")));
        }
    }
}
